#ifndef _TOOL_GROUP_GROUPBYREQUESTID_
#define _TOOL_GROUP_GROUPBYREQUESTID_

#include "../../../function.h"

namespace sp::Tool::Group{

void registe_groupByRequestId();

class groupByRequestId: public Function{
private:
    std::vector<Data*> cur_datas;
    short app_id;
    short flow_id;
    short cur_request_id;
    short final_request_id;
    bool first_flag;
public:
    groupByRequestId(std::vector<std::string> v);
    groupByRequestId(short cnt);
    groupByRequestId();
    virtual ~groupByRequestId();
    static void registe();
    static Function* createObject(std::vector<std::string> params);
    static Function* createObject2();
    virtual void start();
    virtual bool waitForResource();
    virtual void process(std::vector<std::vector<Data*>>& data_input, std::vector<Data*>& data_output);
    virtual bool releaseResource();
    virtual void finish();
    virtual void copy(Function* other);
};

};

#endif